import axios from '@/axios'
enum API {
    EQUIPMENT_GETALL = '/getEquipmentAll',
    EQUIPMENT_GETPAGE = '/getEquipmentPage',
    EQUIPMENT_GETKEYPAGE = '/SearchEquipmentKey',
    EQUIPMENT_UPDATEBYID = '/updataEquipmentById',
    EQUIPMENT_DELETEBYID = '/deleteEquipmentById',
    EQUIPMENT_DELETEMOREBYID = '/deleteEquipmentMoreById',
    EQUIPMENT_ADD = '/addEquipment',
}
// 获取所有任务信息
export const getEquipmentAllAPI = () => axios.get(API.EQUIPMENT_GETALL)
// 分页查询任务
export const getEquipmentPageAPI = (data: any) => axios.post(API.EQUIPMENT_GETPAGE, data)
// 指定key-value分页查询任务
export const getEquipmentKeyPageAPI = (data: any) => axios.post(API.EQUIPMENT_GETKEYPAGE, data)
// 根据id更新任务
export const UpdateEquipmentByIdAPI = (data: any) => axios.post(API.EQUIPMENT_UPDATEBYID, data)
// 根据id删除任务
export const DeleteEquipmentByIdAPI = (id: string) => axios.delete(`${API.EQUIPMENT_DELETEBYID}/${id}`)
// 根据id批量任务
export const DeleteEquipmentMoreByIdAPI = (ids: any) => axios.post(API.EQUIPMENT_DELETEMOREBYID, ids)
// 添加任务
export const AddEquipmentAPI = (data: any) => axios.post(API.EQUIPMENT_ADD, data)